﻿@using FikriKibar.Globalization
@using FikriKibar.UI.WebCommon.Helpers
@using FikriKibar.Entities.Composite.UserModels
@model UpdateModel

@{
    ViewBag.Title = @Resources.UpdateMyPassword;
    Layout = "~/Views/Shared/ContentLayout.cshtml";
}

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">@Resources.UpdateMyInformation</h1>
        </div>
    </div>
    <div class="row">

        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    @Resources.UpdateMyPassword
                </div>
                <div class="panel-body">
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-8">
                                <div class="well" id="user-page-well">
                                   @using (Html.BeginForm("UpdateMyPassword", "User", FormMethod.Post, new { @role = "form" }))
                                   {

                                    <div class="form-group">
                                        <label class="control-label" for="User_OldPassword">@Resources.OldPassword</label>
                                        @Html.FikriKibarPasswordFor(m => m.User.OldPassword, new { @class = "form-control", @placeholder = Resources.OldPassword, @maxlength = 32 })
                                        @Html.ValidationMessageFor(m => m.User.OldPassword)
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label" for="User_Password">@Resources.NewPassword</label>
                                        @Html.FikriKibarPasswordFor(m => m.User.Password, new { @class = "form-control", @placeholder = Resources.Password, @maxlength = 32 })
                                        @Html.ValidationMessageFor(m => m.User.Password)
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label" for="User_ConfirmPassword">@Resources.ConfirmPassword</label>
                                        @Html.FikriKibarPasswordFor(m => m.User.ConfirmPassword, new { @class = "form-control", @placeholder = Resources.ConfirmPassword, @maxlength = 32 })
                                        @Html.ValidationMessageFor(m => m.User.ConfirmPassword)
                                    </div>
                                    <button class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;@Resources.Save</button>
                                   }
                                </div>

                            </div>
                            <div class="col-lg-4">
                                @Html.Action("UserSidebar", "User")
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <div class="row">
                <div class="col-lg-12 text-center">
                    @Html.FikriKibarAlertFor(m => m.Message, "div", Model.Message, new { @class = "alert alert-danger" })
                </div>
            </div>
        </div>
    </div>
</div>